
#pragma once

#include <string>
#include <utility>
#include <vector>

#include "catalog.hpp"
#include "abstract_expression.h"

namespace DaseX {

enum class LogicType { And, Or };

/**
 * LogicExpression represents two expressions being computed.
 */
class LogicExpression : public AbstractExpression {
public:

  LogicExpression(AbstractExpressionRef left, AbstractExpressionRef right, LogicType logic_type)
      : AbstractExpression({std::move(left), std::move(right)},LogicalType::BOOL), logic_type_{logic_type} {
    if (GetChildAt(0)->GetReturnType() != LogicalType::BOOL || GetChildAt(1)->GetReturnType() != LogicalType::BOOL) {
      printf("expect boolean from either side");
    }
  }

  auto Evaluate(const arrow::RecordBatch *tuple,
                const arrow::Schema &schema) const -> int override {
    return 0;
  }

  auto EvaluateJoin(const arrow::RecordBatch *left_tuple,
                    const arrow::Schema &left_schema,
                    const arrow::RecordBatch *right_tuple,
                    const arrow::Schema &right_schema) const -> int override {
    return 0;
  }
  EXPR_CLONE_WITH_CHILDREN(LogicExpression);
  LogicType logic_type_;


};

}
